import store from "./index"
// 初始数据
const creatData = {
    type: 2,
    // 国内
    menus1: [
        {
            title: '首页',
            path: '/Home',
        },
        {
            title: '沪深A股',
            path: '/A'
        },
        {
            title: '港股',
            path: '/HK'
        },
        {
            title: '科创板',
            path: '/KechuangPlate'
        },
        {
            title: '北交所',
            path: '/AlarmPrompt'
        },
        {
            title: '板块',
            path: '/Plate',
            type: 'list',
            list: [
                {
                    title: '行业板块',
                    path: '/Plate/INDUSTRY',
                },
                {
                    title: '概念板块',
                    path: '/Plate/CONCEPT',
                }
            ]
        },
        {
            title: '回测',
            path: '/AlarmPrompt'
        },
        {
            title: '量化选股',
            path: '/QuantitativeIntoStocks/Edit'
        },
        {
            title: '策略预警',
            path: '/StrategicWarning'
        },
        {
            title: '交流群',
            type: 'popover',
            path: '/Communication',
            content: `<img
            style="width: 100%; height: 150px;object-fit: contain;"
            src="${require('@/assets/Communication.png')}"
            fit="contain"
          />`
        },
        {
            title: '客服',
            type: 'popover',
            path: '/Customer',
            content: `<img
            style="width: 100%; height: 150px;object-fit: contain;"
            src="${require('@/assets/Customer.png')}"
            fit="contain"
          />`
        },
        {
            title: '开通VIP',
            path: '/MemberCharge'
        },
        {
            title: '客户端',
            path: '/Client'
        },
        {
            title: '风险提示',
            path: '/RiskWarning'
        }
    ],
    times1: [
        // {
        //     name: 'y',
        //     value: '年线'
        // },
        {
            name: '季线',
            value: 'q'
        }, {
            name: '月线',
            value: 'm'
        }, {
            name: '周线',
            value: 'w'
        }, {
            name: '日线',
            value: 'd'
        }, {
            name: '60m',
            value: '60m'
        }, {
            name: '30m',
            value: '30m'
        }, {
            name: '15m',
            value: '15m'
        }, {
            name: '5m',
            value: '5m'
        }, {
            name: '1m',
            value: '1m'
        }],
    // 国外
    menus2: [
        {
            title: '首页',
            path: '/Home',
        },
        {
            title: '美股',
            path: '/US'
        },
        {
            title: 'ETF',
            path: '/AlarmPrompt'
        },
        {
            title: '板块',
            path: '/Plate',
            type: 'list',
            list: [
                {
                    title: '行业板块',
                    path: '/Plate/INDUSTRY',
                },
                {
                    title: '概念板块',
                    path: '/Plate/CONCEPT',
                }
            ]
        },
        {
            title: '回测',
            path: '/AlarmPrompt'
        },
        {
            title: '金池',
            path: '/AlarmPrompt'
        },
        {
            title: '量化选股',
            path: '/QuantitativeIntoStocks/Edit'
        },
        {
            title: '策略预警',
            path: '/StrategicWarning'
        },
        {
            title: '客户端',
            path: '/Client'
        },
        {
            title: '风险提示',
            path: '/RiskWarning'
        }
    ],
    times2: [
        // {
        //     name: 'y',
        //     value: '年线'
        // },
        {
            name: '季线',
            value: 'q'
        }, {
            name: '月线',
            value: 'm'
        }, {
            name: '周线',
            value: 'w'
        }, {
            name: '日线',
            value: 'd'
        }, {
            name: '240m',
            value: '240m'
        }, {
            name: '60m',
            value: '60m'
        }, {
            name: '30m',
            value: '30m'
        }, {
            name: '15m',
            value: '15m'
        }, {
            name: '10m',
            value: '10m'
        }, {
            name: '5m',
            value: '5m'
        }, {
            name: '3m',
            value: '3m'
        }, {
            name: '1m',
            value: '1m'
        }],
    // 策略列表
    strages: [
        {
            type: '多头',
            name: '弱1买',
            value: 'weak_1buy'
        }, {
            type: '多头',
            name: '强1买',
            value: 'strong_1buy'
        }, {
            type: '多头',
            name: '弱3买',
            value: 'weak_3buy'
        }, {
            type: '多头',
            name: '强3买',
            value: 'strong_3buy'
        }, {
            type: '空头',
            name: '弱1卖',
            value: 'weak_1sell'
        }, {
            type: '空头',
            name: '强1卖',
            value: 'strong_1sell'
        }, {
            type: '空头',
            name: '弱3卖',
            value: 'weak_3sell'
        }, {
            type: '空头',
            name: '强3卖',
            value: 'strong_3sell'
        }, {
            type: '多头',
            name: '中枢扩展',
            value: 'up_zs_normal_ext'
        }, {
            type: '多头',
            name: '超级核裂变',
            value: 'up_zzs_super_ext'
        }, {
            type: '多头',
            name: '混淆扩展',
            value: 'up_zzs_mix_ext'
        }, {
            type: '多头',
            name: '小连环套',
            value: 'up_small_llt'
        }, {
            type: '多头',
            name: '大连环套',
            value: 'up_big_llt'
        }, {
            type: '多头',
            name: '潜力7',
            value: 'up_zs_level7'
        }, {
            type: '多头',
            name: '亮绿9',
            value: 'up_zs_level9'
        }, {
            type: '空头',
            name: '中枢扩展',
            value: 'down_zs_normal_ext'
        }, {
            type: '空头',
            name: '超级核裂变',
            value: 'down_zzs_super_ext'
        }, {
            type: '空头',
            name: '混淆扩展',
            value: 'down_zzs_mix_ext'
        }, {
            type: '空头',
            name: '小连环套',
            value: 'down_zsmall_llt'
        }, {
            type: '空头',
            name: '大连环套',
            value: 'down_zbig_llt'
        }, {
            type: '空头',
            name: '紫色空头',
            value: 'down_zs'
        }, {
            type: '多头',
            name: '主1区',
            value: 'up_main_flag'
        }, {
            type: '空头',
            name: '主-1区',
            value: 'down_main_flag'
        }],
    stragesSea: [{
        type: '',
        name: '小底',
        value: 'sea_level1'
    }, {
        type: '',
        name: '中底',
        value: 'sea_level2'
    }, {
        type: '多头',
        name: '大底',
        value: 'sea_level3'
    }, {
        type: '多头',
        name: '超大底',
        value: 'sea_level4'
    }]
}
// 载入初始数据
export const creat = () => {
    const { type, menus1, menus2, times1, times2, strages, stragesSea } = creatData

    store.commit('system/SET', { key: 'type', value: creatData.type })
    if (type == 1) {
        // 国内
        store.commit('system/SET', { key: 'code', value: 'SH.000001' })
        store.commit('system/SET', { key: 'market', value: 'a' })
        store.commit('system/SET', { key: 'menus', value: menus1 })
        store.commit('system/SET', { key: 'times', value: times1 })
    } else if (type == 2) {
        // 国外
        store.commit('system/SET', { key: 'code', value: 'US.QQQ' })
        store.commit('system/SET', { key: 'market', value: 'us' })
        store.commit('system/SET', { key: 'menus', value: menus2 })
        store.commit('system/SET', { key: 'times', value: times2 })
    }
    // 写入基础数据
    // 板块列表
    store.commit('system/SET', { key: 'plates', value: [] })

    // 缠论策略列表
    store.commit('system/SET', { key: 'strages', value: strages })
    // 海底捞月策略
    store.commit('system/SET', { key: 'stragesSea', value: stragesSea })

}
